import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path";
import {createSvgIconsPlugin} from 'vite-plugin-svg-icons'
import vueDevTools from 'vite-plugin-vue-devtools'

// https://vite.dev/config/
export default defineConfig({
    plugins: [
        vue(),
        // vueDevTools(),
        createSvgIconsPlugin({
            iconDirs: [path.resolve(process.cwd(), 'src/assets/svg')],
            symbolId: 'icon-[dir]-[name]'
        }),
    ],
    css: {
        preprocessorOptions: {
            scss: {
                api: "modern-compiler", // or 'modern'
            },
        },
    },
    resolve: {
        alias: {
            "@": path.resolve(__dirname, "./src"), // 配置 @ 指向 src 目录
        },
    },
})
